import request from '@/config/axios'

//创建策略
export const strategyCreate = async (data) => {
  return await request.post({
    url: '/amp/strategy/create',
    data
  })
}
//删除策略
export const strategyDelete = async (id) => {
  return await request.delete({
    url: '/amp/strategy/delete?id=' + id
  })
}
//获得策略
export const strategyGet = async (id) => {
  return await request.get({
    url: '/amp/strategy/get?id=' + id
  })
}
//获得策略分页
export const strategyPage = async (params) => {
  return await request.getOriginal({
    url: '/amp/strategy/page',
    params
  })
}
//策略修改
export const strategyUpdate = async (data) => {
  return await request.put({
    url: '/amp/strategy/update',
    data
  })
}

//导入策略
export const importStrategy = async (data) => {
  return await request.post({
    url: '/amp/strategy/create-to-secondary-strategy',
    data
  })
}

//更新策略
export const strategyRenew = async (id) => {
  return await request.put({
    url: '/amp/strategy/intoStrategy',
    data: id
  })
}
